package com.code.day17JiHe.Stream;

import java.util.Objects;

public class method {
    private  String name;
    private  Integer age;

    public method() {
    }

    public method(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "method{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    @Override
    public boolean equals(Object object) {
        if (object == null || getClass() != object.getClass()) return false;
        method method = (method) object;
        return Objects.equals(name, method.name) && Objects.equals(age, method.age);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, age);
    }
}
